package structure.proxy;

public class Client {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
        ProxyFactory<RealObject> proxyFactory = new ProxyFactory();
        Sell proxy = proxyFactory.getProxy(RealObject.class);
        proxy.sellTicket();

        ProxyFactory<Animal> proxyFactory2 = new ProxyFactory();
        Run proxy1 = proxyFactory2.getProxy(Animal.class);
        proxy1.run();
        proxy1.eat();

    }
}
